<?php
/**
 * SettingsController class.
 * SettingsController is for settings.
 * 
 * LBB Solutions Ltd. 版权所有 @ 2012.
 */
class WindowsController extends CController
{
	public function actionLocation() {
		//get device, token
		$device = Yii::app()->request->getParam('device', null);
		$token = Yii::app()->request->getParam('token', null);
		if (empty($device) or empty($token)) {
			echo 'device or token cannot be empty!';
			Yii::app()->end();
		}
		$lat = Yii::app()->request->getParam('lat');
		$lng = Yii::app()->request->getParam('lng');
		
		$log = new BLogger(Yii::app()->basePath . "/../APILogs/api_location_" . date('Ym') . ".txt", BLogger::INFO);
		$log->LogInfo("{location} -> " . json_encode($_REQUEST));
	}
}

?>
